<template>
  <div>
    <h2>登录</h2>
    <el-form>
      <el-form-item label="用户名">
        <el-input v-model="loginForm.tel" placeholder="请输入用户名"></el-input>

        <el-button type="primary" @click="getcode">登录</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script setup>
import { reactive, ref } from "vue";
import { getCode } from "@/api/home.js";
const loginForm = reactive({
  tel: "15738996033",
});
const getcode = () => {
  const aa = getCode(loginForm.tel);
  console.log(aa, "aa");
};
</script>
<style lang="less" scoped></style>
